1. Hello
  2. Overview
  3. The structure
  4. Quick install
  5. Plugin options
  6. Faq
  7. Tricks and tips
  8. Notes
  9. Support

Slick Modal - HTML5 and CSS3 modal popups

Documentation


Thank you for choosing Slick Modals

Before you get started i suggest you read the documentation and incase you have an issue or you need help, feel free to contact me via email or PM on Codecanyon.

Overview


Slick Modal are HTML5 and CSS3 popups, which are ment to be easely implementated into almoust any website or CMS system with some basic knowledge of HTML, CSS and/or server side scripting.
It is a framework for easy installation, customization and development. It is not a CMS plugin, module or widget hence it needs to be installed manually. Slick Modals does not contain premade popup designs, it is a layout/framework popup for your custom popup design/s for static websites or dynamic (CMS).



1. Supported browsers
Note 1: Slick Modal is tested in browsers, listed above - on PC and partialy MAC. Older browsers (like Internet Explorer 9 and below) or browsers, which don't support CSS3 features in full, will not render the elements, positions and animations correctly.
Note 2: Slick Modal should work on almoust all modern portable devices (IOS and Android based), but it was created and tested to work mainly on desktops and high-res tablets, which support CSS3 tehniques, used in creating the popup.



2. Supported resolutions

Slick Modal is made to be used for popups with fixed dimensions. If you plan to use responsive content, it's best to adapt your content with css media queries. You can also check the responsive demo (Contact form - responsive) which servers as a simple guide for you to create your modal content responsive. More about media queries on W3Schools.


3. Package contents
  1. Quick start - includes a single demo for a quick start
  2. Demo layouts - included basic demo layouts for reference
  3. Slick Stats - statistics for Slick Modal(s)
  4. Modal generator - quick modal settings generator
  5. Documentation
  6. assets - all main plugin and support demo files (css and js)
  7. changelog.txt

The structure


Slick Modal popup is made from the html elements which define the layout, CSS for basic layout design and JS plugin, which controls the functionality part of the popup.



1. HTML

The html is very minimal. It consist from unique ID, which is the parent for the window element that holds our popup content inside.


<!-- ========== START COPYING HERE ========== -->
	<div id="popup-1" class="slickModal">
		<div class="slickWindow">
			<!-- Your popup content -->
			... your content goes here ...
			<!-- / Your popup content -->
		</div>
	</div>
<!-- ========== END COPYING HERE ========== -->


2. CSS

The CSS is made for basic popup styling and layout functionlities. It can be modified if needed but most of our styling here is just a basic fallback if none of the jQuery plugin options are selected. The CSS structure is made from:

3. jQuery plugin

jQuery plugin controls the functionality part of the popup. We invoke/call our options right inside the js file. Below is an example of a simple popup with all possible options for usage:


// Slick modal settings
$(document).ready(function() {

    // Modal 1
    $('#popup-1').slickModals({
        // Hide on pages
        hideOnPages: [
            '/foo/page1/',
            '/foo/page2/',
            '/foo/page3/'
        ],
        // Popup type
        popupType: 'delayed',
        delayTime: 1000,
        scrollTopDistance: 400,
        // Auto closing
        autoClose: false,
        autoCloseDelay: 3000,
        // Statistics
        enableStats: false,
        fileLocation: 'slickStats/collect.php',
        modalName: 'My awesome modal 1',
        modalSummary: 'Lorem ipsum dolor sit amet',
        callToAction: 'cta',
        // Popup cookies
        setCookie: true,
        cookieDays: 30,
        cookieTriggerClass: 'setCookie-1',
        cookieName: 'slickModal-1',
        cookieScope: 'domain',
        // Overlay styling
        overlayVisible: true,
        overlayClosesModal: true,
        overlayColor: 'rgba(0,0,0,0.85)',
        overlayAnimationDuration: '0.4',
        overlayAnimationEffect: 'fadeIn',
        // Background effects
        pageAnimationDuration: '0.4',
        pageAnimationEffect: 'scale',
        pageBlurRadius: '1px',
        pageScaleValue: '0.9',
        pageMoveDistance: '30%',
        // Popup styling
        popupWidth: '480px',
        popupHeight: '280px',
        popupLocation: 'bottomRight',
        popupAnimationDuration: '0.4',
        popupAnimationEffect: 'zoomIn',
        popupBoxShadow: '0 0 20px 0 rgba(0,0,0,0.4)',
        popupBackground: '#fff',
        popupRadius: '12px',
        popupMargin: '30px',
        popupPadding: '30px',
        // Mobile rules
        showOnMobile: true,
        responsive: true,
        mobileBreakPoint: '480px',
        mobileLocation: 'center',
        mobileWidth: '100%',
        mobileHeight: '280px',
        mobileRadius: '0',
        mobileMargin: '0',
        mobilePadding: '24px',
        // Animate content
        contentAnimation: true,
        contentAnimationEffect: 'zoomIn',
        contentAnimationDuration: '0.4',
        contentAnimationDelay: '0.4',
        // Youtube videos
        videoSupport: true,
        videoAutoPlay: true,
        videoStopOnClose: true,
        // Close and reopen button
        addCloseButton: true,
        buttonStyle: 'icon',
        enableESC: true,
        reopenClass: 'openSlickModal-1',
        // Additional events
        onSlickLoad: function() {
            console.log("Slick is visible")
        },
        onSlickClose: function() {
            console.log("Slick is hidden")
        }
    });

});

Quick Installation


Before installation please check the requirements:

In order to install Slick Modal popup into your html page, follow these few simple steps:

1. COPY THE HTML ELEMENTS

Open the 1. Quick start folder or choosen demo folder. Then open index.html document with your favorite text editor.
Once opened in editor, simply select all the code between the main comments ("START COPYING HERE" and "END COPYING HERE") and copy selected code to your document file right before closing </body> tag at the end of your page. Also include the plugin invoke and settings at the bottom of your document right before closing </body> tag and adjust the upload path of the plugin javascript file.


<!-- START COPYING HERE -->
<div id="popup-1" class="slickModal">
    <div class="slickWindow">
        <!-- Your popup content -->
        ... insert your modal content here (HTML, iframe or other object) ...
        <!-- / Your popup content -->
    </div>
</div>
<!-- Slick Modals jQuery plugin -->
<script type="text/javascript" src="UploadPath/slickModal.min.js"></script>
<!-- Slick modal settings -->
<script type="text/javascript">
    $(document).ready(function() {
        // Modal 1
        $('#popup-1').slickModals({
            // Hide on pages
            hideOnPages: [
                '/foo/page1/',
                '/foo/page2/',
                '/foo/page3/'
            ],
            // Popup type
            popupType: 'delayed',
            delayTime: 1000,
            scrollTopDistance: 400,
            // Auto closing
            autoClose: false,
            autoCloseDelay: 3000,
            // Statistics
            enableStats: false,
            fileLocation: 'slickStats/collect.php',
            modalName: 'My awesome modal 1',
            modalSummary: 'Lorem ipsum dolor sit amet',
            callToAction: 'cta',
            // Popup cookies
            setCookie: true,
            cookieDays: 30,
            cookieTriggerClass: 'setCookie-1',
            cookieName: 'slickModal-1',
            cookieScope: 'domain',
            // Overlay styling
            overlayVisible: true,
            overlayClosesModal: true,
            overlayColor: 'rgba(0,0,0,0.85)',
            overlayAnimationDuration: '0.4',
            overlayAnimationEffect: 'fadeIn',
            // Background effects
            pageAnimationDuration: '0.4',
            pageAnimationEffect: 'scale',
            pageBlurRadius: '1px',
            pageScaleValue: '0.9',
            pageMoveDistance: '30%',
            // Popup styling
            popupWidth: '480px',
            popupHeight: '280px',
            popupLocation: 'bottomRight',
            popupAnimationDuration: '0.4',
            popupAnimationEffect: 'zoomIn',
            popupBoxShadow: '0 0 20px 0 rgba(0,0,0,0.4)',
            popupBackground: '#fff',
            popupRadius: '12px',
            popupMargin: '30px',
            popupPadding: '30px',
            // Mobile rules
            showOnMobile: true,
            responsive: true,
            mobileBreakPoint: '480px',
            mobileLocation: 'center',
            mobileWidth: '100%',
            mobileHeight: '280px',
            mobileRadius: '0',
            mobileMargin: '0',
            mobilePadding: '24px',
            // Animate content
            contentAnimation: true,
            contentAnimationEffect: 'zoomIn',
            contentAnimationDuration: '0.4',
            contentAnimationDelay: '0.4',
            // Youtube videos
            videoSupport: true,
            videoAutoPlay: true,
            videoStopOnClose: true,
            // Close and reopen button
            addCloseButton: true,
            buttonStyle: 'icon',
            enableESC: true,
            reopenClass: 'openSlickModal-1',
            // Additional events
            onSlickLoad: function() {
                // Your code goes here
            },
            onSlickClose: function() {
                // Your code goes here
            }
        });

    });
</script>
<!-- / END COPYING HERE -->



Note 1: For Slick Modal popup to work properly, it's best to copy all the code into first nesting level between <body> tags at the bottom of your page right before closing </body> tag. It's not recommended to nest the popup inside other elements, as it might brake the design layout or put the Slick Modal popup behind another element on the page.




2. EDIT THE HTML

Once you have pasted the html code then insert your elements between the "Your popup content" and "/ Your popup content" comments. You can put any elements inside it, your Contact form, signup form, video, map, iframe or other objects.


<!-- ========== START COPYING HERE ========== -->
<div id="popup-1" class="slickModal">
	<div class="slickWindow">
		<!-- Your popup content -->
		... your content goes here ...
		<!-- / Your popup content -->
	</div>
</div>
<!-- ========== END COPYING HERE ========== -->



Note 1: You can insert any image, iframe, video or element inside the Slick Modals.




3. UPLOAD THE CSS AND JAVASCRIPT FILES

Upload Slick Modal css and jquery file from /assets/css and /assets/js into your chosen folder on your webserver or local site. It's recommended that you use minified versions of both files for better performance.. Incase you are using a countdown also copy jquery.jCounter-0.1.4.js and datetime.php (this one goes to your website root folder).
Then call the css and jquery file(s). Call CSS from the <head> section and if possible call the jquery plugin right before closing </body> tag for better performance. Below is a demo of callings:


<head>
	... your site head elements
	<link rel="stylesheet" type="text/css" href="UploadPath/slickModal.min.css" media="screen" />
</head>

<body>
	... your site content
    ... Slick Modal HTML
	<script type="text/javascript" src="UploadPath/slickModal.min.js"></script>
    ... Slick Modal Plugin settings
</body>



Note 1: Be sure to match the path to the files where you have uploaded them.
Note 2: Call the Slick Modal jQuery plugin after you call your jQeury library.




4. INCLUDE THE FILES FOR SLICK STATS (optional - BETA)

Slick Modal comes with a simple statistics script which you can use to quickly check the stats of your modal. In order to enable the stats please follow these steps:

  1. Copy slickStats folder to your webserver (located within 3. Slick stats folder).
  2. Edit .htaccess in slickStats/preview-52893 folder and change the ::1 on line 9 to your IP address from which you will access the stats so the stats will be visible only to you. You can add multiple IP addresses separated by space in the same line.
  3. Rename the preview-52893 folder to a name which only you will know.
  4. Edit the plugin options within the plugin settings where you enable the stats, name your modal, create a summary and cta trigger along with adjusting the path for the collect.php file.
  5. Visit the stats page to check if the stats are being saved (after enabling the modal), for example: http://doman.com/slickStats/preview-52893/.

To check the statistics you must visit the URL where you have uploaded the Slick Stats folder, for example: http://doman.com/slickStats/preview-52893/



Note 1: Slick stats is currently in BETA / experimental stage so please report any bugs you find with it. Inaccurate and distorted data might occur.

Plugin options


Your popup consist from the options you give it by changing the settings inside the Slick jQuery file.
They give you control of modal's functionality, look and feel. They can be found at the end of the slickModal.min.js file. Below is an explanation of all avaliable options:


hideOnPages = Here you define the pages where the modal should stay hidden. Pages should be wrapped in single quotes and devided my a comma. Use full page path without a domain name to hide the modal from defined page, for example:
hideOnPages: [
    '/some/category-1/',
    '/some/other/page/',
    '/old/page/'
],


popupType = Defines your popup type. Avaliable options:
  • 'delayed' (popup will activate on delay)
  • 'scrolled' (popup will activate on scroll)
  • 'exit' (popup will activate on exiting the page at the top of the opened window)
  • 'none' (if you wish to activate the popup manually on element click)


delayTime = delay time in miliseconds of delayed popup type. Can be:
  • any integer value (for example: 2000 = 2 seconds)


scrollTopDistance = distance in px from the top of window for scrolled popup type. Can be:
  • any integer value (for example: 400 = 400px from the top of page)


autoClose = If set to true the modal with auto close after defined time within the autoCloseDelay setting. Possible options are:
  • true (will auto close the modal after X seconds)
  • false (will not auto close the modal)


autoCloseDelay = defines the time in miliseconds when the modal should auto close.. Possible options are:
  • any integer value (for example: 3000 will auto close the modal in 3 seconds after the modal has been shown to the user)


enableStats = This will enable or disable the statistics for the modal. Before enabling you must install it (Quick install - section 4.). Possible options are:
  • true (will enable the stats)
  • false (will disable the stats)


fileLocation = Upload location of the collect.php file which you have uploaded to your webserver. Possible input:
  • any string value (exact relative path to the file)


modalName = Specify the modal name (campaign) for the stats. Possible input:
  • any string value (only A-Z and 0-9 characters are allowed)


modalSummary = Specify the modal summary for the stats. Possible input:
  • any string value (only A-Z and 0-9 characters are allowed)


callToAction = Selector / class which you set on the html element inside the modal as a main Call To Action and it is used to record the CTR within the stats. In the Quick start demo you will see a "cta" class added to the main button as a reference. Possible input:
  • any string value (class based rules - no special characters and must start with a letter)


setCookie = defines if the popup will set a cookie and hide it self for a period of time from the user. Possible options are:
  • true (will activate the modal to set a cookie and hide it)
  • false (will prevent the modal to set a cookie and hide it)


cookieDays = defines a number of days for the cookie to be active.. Possible options are:
  • 0 (sets a session cookie which expires on closing the browser)
  • any integer value (for example: 5 will set the cookie expiration in 5 days from the page visit)


cookieTriggerClass = a class used to trigger the cookie for each modal when using multiple popups. Classes between multiple popups must not be the same or else all modals will stay hidden. Default is setSlickCookie. This can be used to trigger a cookie from your html elements inside the popup. Possible inputs:
  • 'anyClassName' (for example: 'setCookie-3')


cookieName = specify a cookie name for each modal when using multiple popups. Cookie name must be different for each popup. Default is slickCookie. Possible inputs:
  • 'anyChoosenName' (for example: 'myCookie5')


cookieScope = specify a cookie scope eg. if it's set for entire domain or just for specific page. Possible options:
  • 'domain' (this will hide the modal on whole domain)
  • 'page' (this will hide the modal on current page only)


overlayVisible = specify if overlay should be active or not. If you set it to false the modal will have no background overlay. Possible options:
  • true (this will show the overlay)
  • false (this will hide the overlay)


overlayClosesModal = specify if overlay can close the modal or not and set a cookie if enabled. Possible options:
  • true (this will enable closing the modal on clicking the overlay)
  • false (this will disable closing the modal on clicking the overlay)


overlayColor = specify the overlay background color. Possible options:
  • any 'HEX' value (for example: '#222')
  • any 'RGB(A)' value (for example: 'rgba(0,0,0,0.85)')


overlayAnimationDuration = specify the overlay animation speed. Possible inputs:
  • any integer or decimal numerical value (for example: '0.4' will set a transition delay for 0.4s)


overlayAnimationEffect = specify the overlay transition effect. Same as the popup animation you can use:
  • fadeIn
  • zoomIn
  • zoomOut
  • slideTop
  • slideRight
  • slideBottom
  • slideLeft
  • rotateIn
  • rotateOut
  • flipInX
  • flipInY
  • swingTop
  • swingRight
  • swingBottom
  • swingLeft
  • flash
  • pulse
  • rubberBand
  • shake
  • swing
  • tada
  • wobble
  • bounce
  • bounceIn
  • bounceInUp
  • bounceInDown
  • bounceInRight
  • bounceInLeft
  • unFold
  • flowIn


pageAnimationEffect = defines effect on the page background upon opening a modal. You can set:.
  • 'blur' (this effect will blur the rest of the page)
  • 'scale' (this effect will scale the rest of the page)
  • 'moveUp' (this effect will move the page up)
  • 'moveDown' (this effect will move the page down)
  • 'moveLeft' (this effect will move the page left)
  • 'moveRight' (this effect will move the page right)
  • 'none' (no effect for rest of the page will be set)


pageAnimationDuration = specify the speed of the page when given an effect. You can use:
  • any integer or decimal numerical value (for example: '0.4' will set animation speed to 0.4s)


pageBlurRadius = specify the background blur radius. Can be:
  • any integer value in px (for example: '2px' will set a blur radius of 2px)


pageScaleValue = specify the background scale depth. Above 1 it scales up, below 1 scales down.
  • any integer or decimal numerical value (for example: '0.9' will scale down the rest of the page for 10%)


pageMoveDistance = specify the background move value in percentage.
  • any integer or decimal numerical value with % at the end(for example: '30%' will move the page for 30% in choosen direction)


popupWidth = specify modal window width. Can be:
  • any integer value in px (for example: '400px' will set popup width to 400px)
  • any integer value in % (for example: '80%' will set popup width to 80% of the window width)


popupHeight = specify modal window height. Can be:
  • any integer value in px (for example: '200px' will set popup height to 200px)
  • any integer value in % (for example: '80%' will set popup height to 80% of the window height)


popupLocation = specify modal window location on screen. You can use:
  • center (center location on the page)
  • topLeft (top left location on the page)
  • topCenter (top center location on the page)
  • topRight (top right location on the page)
  • bottomLeft (bottom left location on the page)
  • bottomCenter (bottom center location on the page)
  • bottomRight (bottom right location on the page)
  • left (left location on the page)
  • right (right location on the page)


popupAnimationDuration = specify popup's animation effect duration/speed. Can be:
  • any integer or decimal numerical value (for example: '1.2' will set animation duration to 1.2s)


popupAnimationEffect = specify modal window transition effect. You can use:
  • fadeIn
  • zoomIn
  • zoomOut
  • slideTop
  • slideRight
  • slideBottom
  • slideLeft
  • rotateIn
  • rotateOut
  • flipInX
  • flipInY
  • swingTop
  • swingRight
  • swingBottom
  • swingLeft
  • flash
  • pulse
  • rubberBand
  • shake
  • swing
  • tada
  • wobble
  • bounce
  • bounceIn
  • bounceInUp
  • bounceInDown
  • bounceInRight
  • bounceInLeft
  • unFold
  • flowIn


popupBoxShadow = specify modal box shadow. Can be:
  • Box shadow formated value (for example: '0 0 20px 0 rgba(0,0,0,0.5)')


popupBackground = specify modal window background color. Can be:
  • any 'HEX' value (for example: '#222')
  • any 'RGB(A)' value (for example: 'rgba(0,0,0,0.85)')


popupRadius = specify modal window border radius. Can be:
  • any integer value in px (for example: '12px' will set popup border radius to 12px)


popupMargin = specify modal window margins. Can be:
  • any integer value in px (for example: '20px' will set popup margins to 20px)


popupPadding = specify modal window inner padding. Can be:
  • any integer value in px (for example: '10px' will set popup inner paddings to 10px)


showOnMobile = If set to true the modal will be shown on devices which have a view port same or smaller than the specified mobileBreakPoint below. If you choose false the popup can still be reactivated/opened on smaller devices with reopenClass selector which you define. Possible options:
  • true (this will show the modal on lower resolutions)
  • false (this will hide the modal on lower resolutions)


responsive = If set to true the modal will accept responsive rules you define below this option (such as mobile width, height, mobileBreakPoint etc). Possible values:
  • true (this will enable the modal responsive options)
  • false (this will disable the modal responsive options)


mobileBreakPoint = specify the window breakpoint (width) when the modal will accept responsive rules defined below this option. Can be:
  • any integer value in px (for example: '480px' will set popup responsive rules at 480px and resolutions below that value)


mobileLocation = specify modal window location on lower screen resolutions, defined within mobileBreakPoint setting. You can use:
  • center (center location on the page)
  • topLeft (top left location on the page)
  • topCenter (top center location on the page)
  • topRight (top right location on the page)
  • bottomLeft (bottom left location on the page)
  • bottomCenter (bottom center location on the page)
  • bottomRight (bottom right location on the page)
  • left (left location on the page)
  • right (right location on the page)


mobileWidth = specify the modal width on lower resolutions, defined within mobileBreakPoint setting. Can be:
  • any integer value in px or percentage (for example: '100%' will set popup width at 480px and resolutions below that value)


mobileHeight = specify the modal height on lower resolutions, defined within mobileBreakPoint setting. Can be:
  • any integer value in px or percentage (for example: '300px' will set popup height at 480px and resolutions below that value)


mobileRadius = specify the modal border radius on lower resolutions, defined within mobileBreakPoint setting. Can be:
  • any integer value in px (for example: '20px' will set popup border radius at 480px and resolutions below that value)


mobileMargin = specify the modal margin on lower resolutions, defined within mobileBreakPoint setting. Can be:
  • any integer value in px (for example: '20px' will set popup margin at 480px and resolutions below that value)


mobilePadding = specify the modal padding on lower resolutions, defined within mobileBreakPoint setting. Can be:
  • any integer value in px (for example: '10px' will set popup padding at 480px and resolutions below that value)


contentAnimation = If set then the content inside the popup (your content) will be animated additionaly. Possible values:
  • true (this will enable inner content animation)
  • false (this will disable inner content animation)


contentAnimationEffect = specify modal content transition effect. You can use the same effects as for popup:
  • fadeIn
  • zoomIn
  • zoomOut
  • slideTop
  • slideRight
  • slideBottom
  • slideLeft
  • rotateIn
  • rotateOut
  • flipInX
  • flipInY
  • swingTop
  • swingRight
  • swingBottom
  • swingLeft
  • flash
  • pulse
  • rubberBand
  • shake
  • swing
  • tada
  • wobble
  • bounce
  • bounceIn
  • bounceInUp
  • bounceInDown
  • bounceInRight
  • bounceInLeft
  • unFold
  • flowIn


contentAnimationDuration = specify the speed of the modal content effect. You can use:
  • any integer or decimal numerical value (for example: '0.4' will set animation speed to 0.4s)


contentAnimationDelay = specify the delay of the modal content effect. You can use:
  • any integer or decimal numerical value (for example: '1.4' will delay the inner content animation for 1.4s)


videoSupport = if set to true the modal will support Youtube video auto play and video stop on closing the modal. Possible inputs are:
  • true (enabled the Youtube video support)
  • false (disabled the Youtube video support)


videoAutoPlay = if set to true the video will autoplay on modal opening. Possible inputs are:
  • true (Youtube video will start playing when the modal opens)
  • true (Youtube video will not start playing when the modal opens)


videoStopOnClose = if set to true the video will stop playing on modal closing. Possible inputs are:
  • true (Youtube video stop playing on modal close)
  • true (Youtube video continue to play on modal close)


addCloseButton = specify if the modal closing button is visible or not. Possible inputs are:
  • true (closing button will be visible)
  • true (closing button will be hidden)


buttonStyle = specify the modal button style. You can use:
  • icon
  • text
  • labeled
  • tag
  • circle


enableESC = enabled the ESC key to close the modal and set a cookie to hide it afterwards. Possible inputs are:
  • true (ESC key will close the modal and set the cookie)
  • true (ESC key will not close the modal and no cookie will be set upon pressing it)


reopenClass = specify the class to reopen the modal. Use this class in your html element (link, span, button, div etc...). You can use your own class naming. for each popup separately: Can be:
  • 'anyClassName' (for example: 'openSlickModal-2')


onSlickLoad = trigger on Slick load/visible.
  • any event or function upon modal load (this option is for advanced users)


onSlickClose = trigger on Slick close/hide.
  • any event or function upon modal closing (this option is for advanced users)

Be sure to use avaliable options only (in specification above). Note where you need to use quotation marks and specific units (pixels, percentages...). For reference see the setup below:


// Slick modal invoke
<script type="text/javascript">
    $(document).ready(function() {

        // Modal 1
        $('#popup-1').slickModals({
            // Hide on pages
            hideOnPages: [
                '/foo/page1/',
                '/foo/page2/',
                '/foo/page3/'
            ],
            // Popup type
            popupType: 'delayed',
            delayTime: 1000,
            scrollTopDistance: 400,
            // Auto closing
            autoClose: false,
            autoCloseDelay: 3000,
            // Statistics
            enableStats: false,
            fileLocation: 'slickStats/collect.php',
            modalName: 'My awesome modal 1',
            modalSummary: 'Lorem ipsum dolor sit amet',
            callToAction: 'cta',
            // Popup cookies
            setCookie: true,
            cookieDays: 30,
            cookieTriggerClass: 'setCookie-1',
            cookieName: 'slickModal-1',
            cookieScope: 'domain',
            // Overlay styling
            overlayVisible: true,
            overlayClosesModal: true,
            overlayColor: 'rgba(0,0,0,0.85)',
            overlayAnimationDuration: '0.4',
            overlayAnimationEffect: 'fadeIn',
            // Background effects
            pageAnimationDuration: '0.4',
            pageAnimationEffect: 'scale',
            pageBlurRadius: '1px',
            pageScaleValue: '0.9',
            pageMoveDistance: '30%',
            // Popup styling
            popupWidth: '480px',
            popupHeight: '280px',
            popupLocation: 'bottomRight',
            popupAnimationDuration: '0.4',
            popupAnimationEffect: 'zoomIn',
            popupBoxShadow: '0 0 20px 0 rgba(0,0,0,0.4)',
            popupBackground: '#fff',
            popupRadius: '12px',
            popupMargin: '30px',
            popupPadding: '30px',
            // Mobile rules
            showOnMobile: true,
            responsive: true,
            mobileBreakPoint: '480px',
            mobileLocation: 'center',
            mobileWidth: '100%',
            mobileHeight: '280px',
            mobileRadius: '0',
            mobileMargin: '0',
            mobilePadding: '24px',
            // Animate content
            contentAnimation: true,
            contentAnimationEffect: 'zoomIn',
            contentAnimationDuration: '0.4',
            contentAnimationDelay: '0.4',
            // Youtube videos
            videoSupport: true,
            videoAutoPlay: true,
            videoStopOnClose: true,
            // Close and reopen button
            addCloseButton: true,
            buttonStyle: 'icon',
            enableESC: true,
            reopenClass: 'openSlickModal-1',
            // Additional events
            onSlickLoad: function() {
                console.log("Slick is visible")
            },
            onSlickClose: function() {
                console.log("Slick is hidden")
            }
        });

    });
</script>

Faq


In this section we'll cover few basics with Slick Modal popup and some pointers on How to and Faq.




1. How do i set multiple popups on the page?

In order to have two or more modals you should create two html popup elements with different ID's and call the plugin settings for each of them. For example:

1. HTML

<!-- ========== YOUR FIRST POPUP ========== -->
<div id="popup-1" class="slickModal">
	<div class="slickWindow">
		<!-- Your popup content -->
		... your content for popup 1 goes here ...
		<!-- / Your popup content -->
	</div>
</div>

<!-- ========== YOUR SECOND POPUP ========== -->
<div id="popup-2" class="slickModal">
	<div class="slickWindow">
		<!-- Your popup content -->
		... your content for popup 2 goes here ...
		<!-- / Your popup content -->
	</div>
</div>



2. JQUERY

// Plugin invoke
$(document).ready(function() {
    $("#popup-1").slickModals({
        ... settings for popup 1 ...
    });
    $("#popup-2").slickModals({
        ... settings for popup 2 ...
    });
});

You can also check out the multiple popups demo inside 2. Demo layouts/ folder.





2. How do i make popup responsive?

You can specify the popup initial width and height in pixels or percentages and use those values for responsivnes. You can also fine tune it via css media queries. For example - we wish the modal window has a 90% screen width at 480px viewport and smaller:


@media screen and (max-width: 480px) {
	.slickModal .window {
		width: 90% !important;
	}
}

Note 1:Note that initial modal size values are inline styles so you have to use !important atribute to your media querie values. More on CSS3 media queries avaliable here. You can also check the demo of Contact Form which is located in folder 2. Demo layouts. At the bottom of the slickModal.css you will notice the media queries which serve as breakpoints for changing the layout and it's elements at certain screen sizes. You can target specific viewport width, height, their min/max breakpoints, media types and other settings. Within those rules you can then adjust every element and it's css attributes.





3. We are using a form. How to hide modal on submit?

To hide a modal simply add a class "closeModal" to element that submits the form. For example, if you have input that submits the form you can add a class to it:


<input type="submit" class"closeModal-1" value="Submit" />

Note 1: Be sure to define the closing class in the jQuery plugin and use the same class inside your element.





4. I use a promo banner. How can i hide the popup on banner link click?

As mentioned, to hide a modal simply add a class to element you wish (same as the previous answer).




5. I'm using a CMS, how can i install the modal?

Altough Slic Modal is not made as a plugin or module it can still be installed manualy into any CMS. You can follow the quick install guide by editing coresponding CMS template files. Be sure to create backup before manual installation. Support for installing the modal into CMS's is not provided.




6. Why is there a 2. Demo layouts folder?

The demos in that folder are for reference and demo purpouses only for your ease of use. You can use them for your own projects, but the support for modifications and extended functionality of those demos is not provided.




7. How do i change the "Close" text on the closing button?

Edit the Slick css and search for content: "Close" with the editors search command if you are using minified Slick css or look for the following selector and change the text inside the content attribute:

.slickModal .close.text:before {
	color: #fff;
	content: "Close";
	font-size: 9px;
	text-transform: uppercase;
}



8. How can i make the overlay to be a background image?

Open the Slick Modal jQuery and add a background url to the overlayColor option, like this:

	overlayColor: "url('images/bg.jpg') no-repeat center center / cover",

You can also check out the Background image demo inside 2. Demo layouts folder.

Note 1: First value is the background path, second is no-repeat, which prevents the image to repeat. Next is center center which centers the image. And last is cover which stretches the image across the screen.
Note 2: Note the single and double quotes. Single can be outside the string and double inside the url of the background image path.





9. How do i make the popup to be visible only when visitors clicks on certain element?

You can disable the popup's type so it's not delayed, scroll or exit simply by setting the popupType to 'none' in the plugin popupType options like this:

$(document).ready(function() {
    $('#popup-1').slickModals({
        // Popup type
        popupType: 'none',
        ...
    });
});





10. How do i configure the countdown in the demos?

Countdown in the demos is made by 3rd party author. That author provides simple explanation within the plugin comments on it's website: jCounter which should be fairly easy to setup. Within the plugin you can also change the timezone and translations.






11. Slick modal is not working - there is a conflict with other libraries

In that case you are probably using Wordpress or a site with other libraries which might conflict with jQuery. To avoid conflicts you should set the jQuery library to noConflict mode: jQuery noConflict.






12. How does responsive option works?

When you wish to use responsive mode you need to set responsive option to true. This way the responsive rules will be applied to the popup frame. Then you need to set a mobileBreakPoint which will be the point when the popup will accept responsive rules (such as width and height). After that you simply define the popup height, width, border radius, margin and padding withi the same set of options below the mobileBreakPoint option. Note that you will probably still need to define the inner content rules within the css manually by applying the media querie rules. This cannot be controled from the plugin itself as the elements inside the popup are user defined eg. by you. More about media queries on W3Schools






13. I'm getting Forbidden error when accessing the stats page

First you need to rename the preview-52893 folder to your own name so you will be the only one to know it hence preventing unwanted access. Then you need to edit the .htaccess file inside that folder and change the ::1 on line 9 (allow from ::1) to your IP address. Lastly check if the URL is matching the upload folder of the stats.






14. Can we parse the stats data?

Yes, you can parse by collecting the data from data.json file or edit the collect.php to either save the file to your new location or to save it in your format you need.






15. Why are the icons and images from the demo's missing?

Some graphic elements and images are licensed in a way that they cannot be distributed along with the item. In that case you need to insert your own image or graphics.






16. How can i make contact form from the demo to submit emails?

Altough the contact form doesn't come with a server side script to submit mails, you can use the simple script below. Usage:

  1. Create a new php file with your favorite text editor and copy the code below.
  2. Edit the parameters in the code (receiver email, subject...) and save it with some logical name (for example: sendEmail.php).
  3. Upload the file to your web server.
  4. Edit the Slick Modal HTML that you used for the form and look for url: 'yourScript.php' and change the path to your file where you have uploaded it.
  5. Test the form if it works, else preview the steps above.
<?php

    $name = $_POST['name'];
    $email = $_POST['email'];
    $phone = $_POST['phone'];
    $message = $_POST['message'];

    if (!empty($name) && filter_var($email, FILTER_VALIDATE_EMAIL) && !empty($phone) && !empty($message)) {
        // Fields, which will be included in the email
        $formcontent="Name: $name \nEmail: $email \nPhone: $phone \nMessage: $message";
        // Insert your email below
        $recipient = "youremail@domain.com";
        // Change the subject of the form below
        $subject = "Contact Form subject goes here";
        $mailheader = "From: $email \r\n";
        mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
    } else {
        exit('Inputs are not valid!');
    }

?>





17. My counter doesn't show countdown time properly and there are some console errors in dev tool

Please check if you have uploaded dateandtime.php file from the assets folder to your website root directory.

Note 1: The script is very simple and doesn't offer advanced layers of protection so use it as a reference/starting point.





18. How do I use Popup generator?

To use the generator open index.html within the 4. Modal generator folder. Generator enables you to quickly customize the modal by adjusting the settings within it and preview the live in your browser. After you are satisfied with the modals look simply click Generate button and the settings for your popup will be generated. Use them by following the instructions within the popup of the generated settings or by checking the Quick install section.

Note 1: Not all settings can be previewed live in the generator (for example: stats, mobile preview etc...).

Tricks and tips



1. Don't mix same popup types

In order for popup's to show properly you shouldn't mix popup types when using multiple popups. For example, popup-1 can have a delayed type, but popup-2 should have scrolled or exit type. Keep an eye so that popups don't overlap themselfs.




2. Don't overdo blur or scale effect

Blur & scale are nice effects but they also affect the site performance as it has to redraw all the elements upon firing the animation. So to make your site more user friendly it's recommended to use lower blur and scale values. Optimal is 1-2 px for blur and 0.9 or 1.1 for scale. It's not recommended to use them both simultaneously on the same page as it will reduce the performance of the site dramatically.




3. Debug

If you're stuck with your layout and have issues you can't fix immidiately, i recommend you first try to debug the site with firebug or native browser element inspector (eg. right click --> Inspect element).
This will also help you build your custom layout faster and understand the shematics of how things work in Slick Modal popup.




4. Use minified version

From the performance point it is good practice to use minifed css and js version of the Slick Modal.

Additional notes


Note 1: The layout and functionalities of the item's and their inner elements won't work properly in CSS3 and HTML5 non supported browsers.
Note 2: To view this documentation properly, it is recommended to view it on resolution 1280px of width or above.
Note 3: If you don't understand implementation steps and usage, feel free to contact me. I'm not responsible for any data lost or other damage, which was formed or created during installation or usage of this item, it's elements and code. Always create backups!
Note 4: All the demos within the package are provided as is and without support. They are there for a preview of what you can do with Slick modal and as a reference or a quick start template.




Credits

Special thanks for jCounter countdown plugin to Catalin Berta.

Support


If you get stuck with the installation, usage or modification of the item's, contact me via email support@justcapelle.com or send me a message on Codecanyon.
When you submit a support ticket, please provide much information as possible, for example:

- Your Envato username
- Detailed issue
- URL where you use the item


Thank you again for using Slick Modal. Dont forget to rate :)